<template>
    <view>
        <u-popup :show="recordShow" mode="bottom" overlayOpacity=".9" bgColor="transparent">
            <view class="tanchuang_box" style="background-image: url('https://morgan.dingxians.cn/static/btm1.png');"
                @touchmove.stop.prevent="prevent">
                <view class="title_box"
                    style="background-image: url('https://morgan.dingxians.cn/static/recordDrwa/2.png');"></view>
                <view class="close_guanbi_box" @click="hidePopup"
                    style="background-image: url('https://morgan.dingxians.cn/static/recordDrwa/3.png');"></view>
                <view class="jilu_sta_box">
                    <view class="rule_box"
                        :style="{ backgroundImage: 'url(' + (item.id == signId ? item.sel_img : item.img) + ')' }"
                        v-for="(item, index) in simgleList" :key="index" @click="signClick(item)">
                        {{ item.name }}
                    </view>
                </view>
                <scroll-view class="haudongquyu_nox" scroll-y v-if="rewardList.length > 0">
                    <view class="dabing_dangess_nox" v-for="(item, index) in rewardList" :key="index">
                        <view class="dange_boxjilu">
                            <view class="touxiang_box">
                                <image :src="item.avatar" mode="scaleToFill" />
                                <view class="touxiangkuang_box" v-if="item.level_id > 0">
                                    <image
                                        :src="'https://morgan.dingxians.cn/static/txk/' + (item.level_id >= 1 && item.level_id <= 4 ? '1_4' : item.level_id >= 5 && item.level_id <= 8 ? '5_8' : item.level_id >= 9 && item.level_id <= 12 ? '9_12' : item.level_id >= 13 && item.level_id <= 16 ? '13_16' : '17_20') + '.png'"
                                        mode="widthFix" />
                                </view>
                            </view>
                            <view class="name_shaop_box">
                                <view class="t_1_box">
                                    <view class="left_name_box">{{ item.nickname }}</view>
                                    <view class="rt_level_name_box">
                                        <image
                                            :src="'https://morgan.dingxians.cn/static/user_levelid/' + item.level_id + '.png'"
                                            mode="heightFix" />
                                    </view>
                                    <view class="jg_num">第{{item.id}}发</view>
                                </view>
                                <view class="b_2_box">{{ item.created_at }}</view>
                            </view>
                            <view class="right_boxss">
                                <view class="shop_dengjibox">{{ item.box_prize_level_name }}</view>
                                <view class="shijian_box">{{ item.box_prize_name }}</view>
                            </view>
                        </view>
                        <!-- <view class="jg_num" v-if="signId != 0">X{{ item.jg_num }}发</view> -->
                    </view>

                </scroll-view>

                <empty v-else></empty>
            </view>
        </u-popup>

    </view>
</template>
<script>
export default {
    props: {
        recordShow: {
            type: Boolean,
            default: false
        },
        rewardList: {
            type: Array,
            default: []
        },
        simgleList: {
            type: Array,
            default: []
        },
        signId: {
            type: [Number, String],
            default: 0
        }
    },
    methods: {
        hidePopup() {
            this.$emit('handlePopup')
        },
        signClick(item) {
            this.$emit('signClick', item)
        }
    }
}
</script>
<style lang="scss" scoped>
.tanchuang_box {
    width: 750rpx;
    height: 1000rpx;
    background-size: 100% 100%;
    box-sizing: border-box;
    padding-top: 45rpx;
    position: relative;

    .title_box {
        width: 442rpx;
        height: 66rpx;
        background-size: 100% 100%;
        margin: auto;
        margin-bottom: 34rpx;
    }

    .close_guanbi_box {
        position: absolute;
        width: 72rpx;
        height: 72rpx;
        background-size: 100% 100%;
        top: 41rpx;
        right: 21rpx;
    }

    .jilu_sta_box {
        width: 100%;
        height: 60rpx;
        box-sizing: border-box;
        padding: 0 27rpx;
        display: flex;
        justify-content: space-between;
        margin-bottom: 31rpx;

        .rule_box {
            width: 152rpx;
            height: 60rpx;
            font-family: test1;
            background-size: 100% 100%;
            font-weight: bold;
            font-size: 28rpx;
            color: #FFFFFF;
            line-height: 18rpx;
            font-style: italic;
            text-align: center;
            line-height: 60rpx;
        }
    }

    .haudongquyu_nox {
        width: 100%;
        height: 780rpx;
        box-sizing: border-box;
        padding: 0 5rpx;
        overflow: hidden;
        overflow-y: auto;

        .dabing_dangess_nox {
            width: 100%;
            // height: 140rpx;
            margin-bottom: 41rpx;

            .dange_boxjilu {
                width: 740rpx;
                height: 100rpx;
                background: rgba(120, 9, 9, .5);
                margin: auto;
                display: flex;
                justify-content: flex-start;
                align-items: center;
                box-sizing: border-box;
                padding: 0 20rpx;
                position: relative;

                .touxiang_box {
                    width: 80rpx;
                    height: 80rpx;
                    border-radius: 50%;
                    margin-right: 30rpx;
                    position: relative;

                    .touxiangkuang_box {
                        width: 100rpx;
                        height: 100rpx;
                        left: -13rpx;
                        top: -10rpx;
                        position: absolute;

                        image {
                            width: 100%;
                            height: 100%;
                        }
                    }

                    image {
                        width: 100%;
                        height: 100%;
                        border-radius: 50%;
                    }
                }

                .name_shaop_box {
                    height: 100rpx;

                    .t_1_box {
                        display: flex;
                        justify-content: flex-start;

                        .left_name_box {
                            height: 50rpx;
                            font-family: PingFang SC;
                            font-weight: bold;
                            font-size: 24rpx;
                            color: #F6F4FF;
                            line-height: 50rpx;
                            margin-right: 20rpx;
                        }

                        .rt_level_name_box {
                            box-sizing: border-box;
                            padding-top: 5rpx;
                            height: 39rpx;

                            image {
                                height: 39rpx;
                            }

                        }
                        .jg_num {
                height: 40rpx;
                text-align: left;
                box-sizing: border-box;
                padding-left: 20rpx;
                font-family: PingFang SC;
                // font-weight: bold;
                font-size: 24rpx;
                color: #F6F4FF;
                line-height: 40rpx;
            }
                    }

                    .b_2_box {
                        height: 50rpx;
                        font-family: PingFang SC;
                        // font-weight: bold;
                        font-size: 22rpx;
                        color: #F6F4FF;
                        line-height: 50rpx;
                        text-align: center;
                    }


                }

                .right_boxss {
                    position: absolute;
                    right: 30rpx;
                    height: 100rpx;

                    .shop_dengjibox {
                        height: 50rpx;
                        font-family: text1;
                        font-weight: bold;
                        font-size: 28rpx;
                        color: #FFFFFF;
                        line-height: 50rpx;
                        text-align: right;
                    }

                    .shijian_box {
                        width: 300rpx;
                        height: 50rpx;
                        text-align: right;
                        font-family: PingFang SC;
                        // font-weight: bold;
                        font-size: 22rpx;
                        color: #F6F4FF;
                        line-height: 50rpx;
                        overflow: hidden;
                        text-overflow: ellipsis;
                        white-space: nowrap;
                    }
                }

            }

            .jg_num {
                height: 40rpx;
                text-align: left;
                box-sizing: border-box;
                padding-left: 20rpx;
                font-family: PingFang SC;
                // font-weight: bold;
                font-size: 24rpx;
                color: #F6F4FF;
                line-height: 40rpx;
            }
        }

    }
}
</style>